const mongoose = require("mongoose")
const schema = new mongoose.Schema({
  player: { type: mongoose.Types.ObjectId, required: true, index: true },
  danmuList: [
    {
      author: { type: mongoose.Types.ObjectId, ref: "User" },
      time: Number,
      text: String,
      color: Number,
      type: { type: Number },
      date: Number,
    },
  ],
})
module.exports = mongoose.model("Danmu", schema)
